<template>
  <div class="loop">
    <swiper :options="swiperOption">
            <swiper-slide>
                <img class="swiper-img" src="@/assets/imgs/1.jpg">
            </swiper-slide>
            <swiper-slide>
                <img class="swiper-img" src="@/assets/imgs/2.jpg">
            </swiper-slide>
            <swiper-slide>
                <img class="swiper-img" src="@/assets/imgs/4.jpg">
            </swiper-slide>
             <swiper-slide>
                <img class="swiper-img" src="@/assets/imgs/5.jpg">
            </swiper-slide>
            <div class="swiper-pagination"  slot="pagination"></div>
    <!--  <div class="swiper-button-prev" slot="button-prev"></div>    左边箭头 
        <div class="swiper-button-next" slot="button-next"></div>         右边箭头  
        <div class="swiper-scrollbar"   slot="scrollbar"></div>         灰色进度条 -->
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'homeloop',
  data() {
      return {
          swiperOption:{
                pagination:'.swiper-pagination',  //传入圆形轮播点(默认为圆点)
                clickable:true,
                loop:true ,  //允许轮播
                autoplay:2000,
                speed:2000,
            },
      }
  },
}
</script>

<style scoped>        
    .loop{
        overflow: hidden;
        height: 0;
        width: 100%;
        padding-bottom: 66.67%;
        background:#fff;
    }
    .swiper-img{    
        overflow: hidden;
        width: 100%;
        height: 5rem;
    }
</style>